package j.framework.base.service;

import j.framework.core.EntityTrigger;
import j.framework.core.ServiceContext;
import j.framework.domain.BaseDomain;

/**
 * 通用业务类
 * User: jason
 * Date: 2014/11/10 16:34
 */
public interface GeneralService {
    /**
     * 从请求上下文中获取指定的实体类
     * @param context
     * @return
     */
    Object findEntity(ServiceContext context, Object entity);

    /**
     * 保存
     * @param context
     * @param trigger
     */
    void doSave(ServiceContext context, String pkTblKey, Object entity, EntityTrigger trigger);

    /**
     * 删除实体
     * @param context
     * @param trigger
     */
    void doDelete(ServiceContext context, Object entity, EntityTrigger trigger);
}
